package com.chenshu.transaction;

import com.chenshu.transaction.service.BankAccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-04-10
 * Time：10:51
 */
public class Application {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-transaction.xml");
        BankAccountService bankAccountService
                = context.getBean("bankAccountService", BankAccountService.class);
        //转账业务测试
        //bankAccountService.transfer("12021052019", "12021052015", 100);
        //存款业务测试
        //bankAccountService.deposit("12021052019", 888);
        //取款业务测试
        bankAccountService.withdraw("12021052019", 888);
        //查询余额测试
        //bankAccountService.selectBalance("12021052019");
        //修改密码测试
        //bankAccountService.updatePassword("12021052019", "cscs123", "cscs123");

    }
}
